
<div class="titlebar">
    <div class="fn-left"><i class="iconfont icon-line-chart_icon"></i>订单数据</div>
    <div class="fn-right">
    <form class="input-group" id="form" action="{:url('order/index')}" method="get">
        <input type="hidden" id="store_id" name="store_id" value="{$store_id}"/>
        <input type="hidden" id="group_id" name="group_id" value="{$group_id}"/>
        <input placeholder="开始时间" class="input w100 ui-date" type="text" name="starttime" value="{$starttime}" autocomplete="off"/>
        <input placeholder="结束时间" class="input w100 ui-date" type="text" name="endtime" value="{$endtime}" autocomplete="off"/>
        <input url="{:url('smartbc/store/selectStore')}" id="selectStore" readonly="true" placeholder="好店名称" class="input w200 selectID" type="text" name="store_name" value="{$store_name}"/>
        <input type="submit" value="搜索" class="button button-blue" />
    </form>
    </div>
    <div class="fn-right button-group">
        <a href="{:url('order/index',['time' => 1])}" class="button{$time==1?' button-violet':''}">今日</a>
        <a href="{:url('order/index',['time' => 2])}" class="button{$time==2?' button-violet':''}">昨日</a>
        <a href="{:url('order/index',['time' => 30])}" class="button{$time==30?' button-violet':''}">本月</a>
        <a href="{:url('order/index',['time' => 60])}" class="button{$time==60?' button-violet':''}">上月</a>
    </div>
</div>
<div class="cards">
    <div class="card">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$user_amount}</div><div class="text">计划付款</div></div>
    </div>
    <div class="card">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$order_amount}</div><div class="text">实际付款<span class="gray fn-f12">[未分账]</span></div></div>
    </div>
    <div class="card">
        <div class="fn-left"><i class="iconfont icon-renminbi1688"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$coupon_price}</div><div class="text">优惠金额</div></div>
    </div>
    <div class="card">
        <div class="fn-left"><i class="iconfont icon-wodedingdan2"></i></div>
        <div class="fn-right fn-tar"><div class="num">{$order_num}</div><div class="text">单数统计</div></div>
    </div>
</div>
<table class="table">
    <thead>
        <tr>
            <th class="w60 fn-tac"></th>
            <th>好店名称</th>
            <th class="w100 fn-tar">￥计付</th>
            <th class="w100 fn-tar">￥优惠</th>
            <th class="w100 fn-tar">￥实付</th>
            <th class="w140">创建时间</th>
            <th class="w260">单号<span class="fn-fn gray">[点击追踪分账细节]</span></th>
            <th class="w140">付款时间</th>
        </tr>
    </thead>
    <tbody>
        {foreach $orders as $vo}
        <tr>
            <td class="fn-tac"><img src="{$vo.store.img}?x-oss-process=style/80" class="w40" /></td>
            <td>
                <i class="iconfont icon-home_icon"></i><a href="javascript:;" url="{:url('store/review',['id' => $vo.store.id])}" class="fn-fb selectID">{$vo.store.name}</a><br />
                <i class="iconfont icon-address_icon"></i><span class="gray">{$vo.store.address}</span>
            </td>
            <td class="fn-tar">￥{$vo.amount}</td>
            <td class="fn-tar">￥{:money($vo.amount - $vo.price)}</td>
            <td class="fn-tar">￥{$vo.price}</td>
            <td>{$vo.update_time|date='Y-m-d H:i'}</td>
            <th>
                <a href="javascript:openwin('{:url('store/queen',['order' => $vo.order_no])}')">
                    <svg class="icon" aria-hidden="true"><use xlink:href="#icon-gongzuorizhi"></use></svg> {$vo.order_no}<br />
                    <svg class="icon" aria-hidden="true"><use xlink:href="#icon-wechat"></use></svg> {$vo.paid_no}
                </a>
            </th>
            <td>{$vo.paid_time|date='Y-m-d H:i'}</td>
        </tr>
        {/foreach}
    </tbody>
</table>
{$orders|raw}
<script type="text/javascript">
Do('base','layer','form','date',function () {
    $('#form').isForm({'types':1});
    $(".selectID").win();
})
function setState(store){
    $("#store_id").val(store.id);
    $("#selectStore").val(store.store_name);
}
</script>